//
//  XMLRefuseReason.m
//  ppkc2016
//
//  Created by 拼凑的断音 on 16/4/14.
//  Copyright © 2016年 拼凑的断音. All rights reserved.
//

#import "XMLRefuseReason.h"
#import "XXTool.h"

@implementation XMLRefuseReason

+(void)requestRefuseReasonWithAppointmentID:(NSString *)apId completion:(void (^)(BOOL, XMLRefuseReason *))block
{
    [DKHTTPRequest sendDataWithShortUrl:@"msg_jjdetail"
                                  Param:[XXTool formatStringWithLanguage:[NSString stringWithFormat:@"userid=%@&passwd=%@&orderid=%@",[UserInfo shareUserInfo].userID,[UserInfo shareUserInfo].userPassword,apId]]
                             ImageArray:nil
                                TimeOut:10
                             Completion:^BOOL(NSMutableDictionary *serverDic, DKHTTPResponseType bufferType) {
                                 if ([[serverDic objectForKey:@"code"] intValue]==200)
                                 {
                                     block(YES,[XMLRefuseReason modelWithDictionary:serverDic]);
                                 }
                                 else
                                 {
                                     block(NO,nil);
                                 }
                                 return YES;
                             } IsBuffering:YES
                      IsNeedReplaceWrap:NO
                        IsUseUpLoadHead:NO];
}


@end
